module.exports = {
    md5(str){
        return require('crypto').createHash('md5').update(str).digest('hex')
    },
    getDayTime(day){
        let now = new Date(),
            daytime = now.getDay(),
            date = now.getDate()>=10?now.getDate():'0'+now.getDate(),
            moth = (now.getMonth()+1)>=10?(now.getMonth()+1):'0'+(now.getMonth()+1),
            year = now.getFullYear()
            fulldate = new Date(`${year}/${moth}/${date} 00:00:00`)
            todaytime = new Date(fulldate).getTime()
            return todaytime - (day-daytime)*86400000
    }
}